import Vue from 'vue'
import App from './App.vue'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import router from "@/router";


Vue.use(ElementUI)

Vue.prototype.$EventBus = new Vue();

//PageOne
document.wpfCallVue = function (e){
  Vue.prototype.$EventBus.$emit('expGet',e)
}

//PageThree
document.initPlanList = function (e){
  Vue.prototype.$EventBus.$emit('initPlanList',e)
}
document.refreshDetail = function (e){
  Vue.prototype.$EventBus.$emit('refreshDetail',e)
}

//PageFour
document.getAllPlans = function (e){
  Vue.prototype.$EventBus.$emit('getAllPlans',e)
}
document.getAllTargetsByPlanId = function (e){
  Vue.prototype.$EventBus.$emit('getAllTargetsByPlanId',e)
}

//PageFive
document.initPlanAndAnswer = function (e){
  Vue.prototype.$EventBus.$emit('initPlanAndAnswer',e)
}
document.newPlanAnswerSet = function (e){
  Vue.prototype.$EventBus.$emit('newPlanAnswerSet',e)
}

Vue.config.productionTip = false

new Vue({
  router,
  render: h => h(App),
}).$mount('#app')
